"""
话题详情页面
"""
from pom.basepage import BasePage
class DetailPage(BasePage):

    def __init__(self,driver):
        super().__init__(driver)

        self.__reply_btn_xpath = '//*[@resource-id="org.cnodejs.android.md:id/fab_reply"]'
        self.__reply_content_xpath = '//*[@resource-id="org.cnodejs.android.md:id/edt_content"]'
        self.__reply_publish_xpath = '//*[@resource-id="org.cnodejs.android.md:id/btn_tool_send"]'

    def click_reply_btn(self):
        self.driver.find_element_by_xpath(self.__reply_btn_xpath).click()

    def type_reply_content(self,content):
        content_area = self.driver.find_element_by_xpath(self.__reply_content_xpath)
        content_area.clear()
        content_area.send_keys(content)

    def click_reply_publish_btn(self):
        self.driver.find_element_by_xpath(self.__reply_publish_xpath).click()

